﻿using System;
using Grishko.DataTier;
using Grishko.SerilizeTools;
using Outdoor.BaseEntity.Context;
using OutdoorLib.BaseEntity.Constraction;

namespace OutdoorLib.BaseEntity.Agency
{
    /// <summary>
    /// Discount
    /// </summary>
    [TagNameInfo(TagName = "Discount")]
    public class Discount : SqlAgencyEntity, AgencySqlSignature
    {
        
        [SrchItemInfo(TxtPropertyName = "Наимнование")]
        public string Name { get; set; }
        

        [SrchItemInfo(TxtPropertyName = "Начисление")]
        public bool IsCharge { get; set; }

        private string _Description = string.Empty;
        public string Description
        {
            get
            {
                return _Description;
            }
            set { _Description = value; }
        }

        private int  _Percent = 0;
        [SrchItemInfo(TxtPropertyName = "Величина %")]
        public int  Percent
        {
            get
            {
                return _Percent;
            }
            set { _Percent = value; }
        }

        private DateTime  _dtStart = DateTime .Now ;
        [SrchItemInfo(TxtPropertyName = "Дата начала")]        
        public DateTime dtStart
        {
            get
            {
                return _dtStart;
            }
            set { _dtStart = value; }
        }

        private DateTime _dtFinish = DateTime.Now.AddMonths (1);
        [SrchItemInfo(TxtPropertyName = "Дата окончания")]        
        public DateTime dtFinish
        {
            get
            {
                return _dtFinish;
            }
            set { _dtFinish = value; }
        }


        private EntityList _SurfaceList = new EntityList();
        
        [SrchItemInfo(TxtPropertyName = "Стороны", ListType = typeof(Side))]
        public EntityList SurfaceList { get { return _SurfaceList; } set { _SurfaceList = value; } }

    }
}

